#ifndef DBNOTESCOUNT_H
#define DBNOTESCOUNT_H

#include <QVariant>
#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QDateTime>
#include <QThread>

class DbNotesCount : public QObject
{
    Q_OBJECT
public:
    explicit DbNotesCount(QObject *parent = nullptr);

    //设置连接名称
    void setDbCommName(const QString &dbCommName);

    void setDbFileName(const QString &dbFileName);

signals:
    void dbNotesCountQFinished(int count, double msec);

public slots:
    void query(const QString sql);

private:
    QString m_dbCommName;
    QString m_dbFileName;

    QSqlDatabase m_Database;
    QThread* thread;
};

#endif // DBNOTESCOUNT_H
